package com.kmh.musicplay.data;

import java.util.ArrayList;

import com.kmh.musicplay.util.Log;

public class FavoriteChannelData
{
	private ArrayList arrChannel = new ArrayList();

	public void addChannel(Channel channel)
	{
		arrChannel.add(channel);
	}

	public void removeChannel(int i)
	{
		arrChannel.remove(i);
	}

	public Channel getChannel(int i)
	{
		if (i < arrChannel.size())
			return (Channel) arrChannel.get(i);
		return null;
	}

	public int getSizeChannel()
	{
		return arrChannel.size();
	}

	public class Channel
	{
		String id;
		String name;
		boolean isFree;
		boolean isPayment;

		public String getId()
		{
			return id;
		}

		public void setId(String id)
		{
			this.id = id;
		}

		public String getName()
		{
			return name;
		}

		public boolean isFree()
		{
			return isFree;
		}

		public void setFree(boolean isFree)
		{
			this.isFree = isFree;
		}

		public void setName(String name)
		{
			this.name = name;
		}

		public boolean isPayment()
		{
			return isPayment;
		}

		public void setPayment(boolean isPayment)
		{
			this.isPayment = isPayment;
		}
	}

	public void dispose()
	{
		arrChannel.clear();
	}
}
